package NovelBar.mapper;

import NovelBar.dto.ChapterDto;
import NovelBar.entity.Chapter;
import NovelBar.dto.OneChapterInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface ChapterMapper {
    Chapter loadNewChapterByBookId(Integer bookid);
    void insertChapter(Chapter chapter);
    List<Chapter> getChapterByBookId(Integer bookId);
    OneChapterInfo getOneChapterById(@Param("chapterBookId") Integer chapterBookId, @Param("bookId")Integer bookId);
    void updateVip(ChapterDto chapterDto);
}
